/*
 * @Descripttion: 
 * @version: 
 * @Author: spring
 * @Date: 2022-04-16 22:58:24
 * @LastEditors: spring
 * @LastEditTime: 2022-04-17 14:36:17
 */
import { ADD_PERSON } from '../constant'
const personUseReducer = (preState:any, action:any) => {
  const { type, data } = action
  switch (type) {
    case ADD_PERSON:
      return [data, ...preState]
    default:
      return preState
  }
}

export default {
  name: 'persons',
  reducer: personUseReducer
}